﻿using CleanArchitecture.Infrastructure.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace CleanArchitecture.Infrastructure.Models.Business.News
{
    /// <summary>
    /// Represents a news item model
    /// </summary>
    public partial class NewsItemModel : BaseEntityModel
    {
        #region Utilities

        public void initItemModel()
        {
            WhoCanSee = EntityEnumConfig.WhoCanSee.EveryOne;
            FKColumnId = 0;
            UserOrRoleId = string.Empty;
            StartTaskTime = null;
            AllowComments = false;
            IsActive = true;
            IsRecommend = false;
            DisplayOrder = 1;
            ImageIds = string.Empty;
            ImageUrls = null;
            AudioIds = string.Empty;
            AudioUrls = null;
            VideoIds = string.Empty;
            VideoUrls = null;
            FileIds = string.Empty;
            FileUrls = null;
            FileTitles = null;
        }

        #endregion

        #region Properties

        public string IdHash { get; set; }
        [DisplayName("栏目菜单")]
        public int FKColumnId { get; set; }
        public string ColumnIdHash { get; set; }

        [DisplayName("文章标题")]
        public string Title { get; set; }

        [DisplayName("内容摘要")]
        public string ContentOverView { get; set; }

        [DisplayName("作者")]
        public string Publisher { get; set; }

        [DisplayName("公开度")]
        public EntityEnumConfig.WhoCanSee WhoCanSee { get; set; }

        [DisplayName("浏览权限")]
        public string UserOrRoleId { get; set; }

        [DisplayName("允许留言/评论")]
        public bool AllowComments { get; set; }

        [DisplayName("MetaTitle")]
        public string MetaTitle { get; set; }

        [DisplayName("MetaKeyWords")]
        public string MetaKeyWords { get; set; }

        [DisplayName("MetaDescription")]
        public string MetaDescription { get; set; }

        [DisplayName("封面图片")]
        public string CoverImageUrl { get; set; }

        [DisplayName("文章内容")]
        public string Contents { get; set; }

        [DisplayName("发布计划")]
        public DateTime? StartTaskTime { get; set; }

        [DisplayName("发布时间")]
        public DateTime CreatedOnTime { get; set; }

        [DisplayName("编辑时间")]
        public DateTime UpdatedOnTime { get; set; }

        public bool IsActive { get; set; }

        [DisplayName("置顶推荐")]
        public bool IsRecommend { get; set; }

        [DisplayName("排序")]
        public int DisplayOrder { get; set; }

        public string ImageIds { get; set; }
        [DisplayName("相册列表")]
        public IList<string> ImageUrls { get; set; }
        public string AudioIds { get; set; }
        [DisplayName("音频列表")]
        public IList<string> AudioUrls { get; set; }
        public string VideoIds { get; set; }
        [DisplayName("视频列表")]
        public IList<string> VideoUrls { get; set; }
        public string FileIds { get; set; }
        [DisplayName("文档列表")]
        public IList<string> FileUrls { get; set; }
        public IList<string> FileTitles { get; set; }
        #endregion

    }
}
